//
//  FHYViewController.m
//  Education
//
//  Created by jxyeagle on 14-8-13.
//  Copyright (c) 2014年 姬鑫宇. All rights reserved.
//

#import "FHYViewController.h"

@interface FHYViewController ()

@end

@implementation FHYViewController

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
    return UIInterfaceOrientationMaskPortrait;
}

- (BOOL)shouldAutorotate
{
    return NO;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    switch (toInterfaceOrientation) {
        case UIInterfaceOrientationPortrait:
            return YES;
            
        case UIInterfaceOrientationLandscapeLeft:
        case UIInterfaceOrientationLandscapeRight:
        case UIInterfaceOrientationPortraitUpsideDown:
        default:
            return NO;
    }
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    _mainTab.selectionIndicatorImage = [UIImage imageNamed:@"选中图"];
    _mainTab.selectedImageTintColor = [UIColor whiteColor];
    _mainTab.backgroundColor = [UIColor grayColor];
    [_mainTab setBackgroundImage:[UIImage imageNamed:@"朋友"]];
    
    UITabBarItem * item1 = [_mainTab.items objectAtIndex:0];
    [item1 setFinishedSelectedImage:[UIImage imageNamed:@"底栏-首页-点击态"] withFinishedUnselectedImage:[UIImage imageNamed:@"底栏-首页-常态"]];
    [item1 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(72, 72, 72)} forState:UIControlStateNormal];
    [item1 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(43, 166, 15)} forState:UIControlStateSelected];
    
    UITabBarItem * item2 = [_mainTab.items objectAtIndex:1];
    [item2 setFinishedSelectedImage:[UIImage imageNamed:@"底栏-操场-点击态"] withFinishedUnselectedImage:[UIImage imageNamed:@"底栏-操场-常态"]];
    [item2 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(72, 72, 72)} forState:UIControlStateNormal];
    [item2 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(43, 166, 15)} forState:UIControlStateSelected];
    
    
    UITabBarItem * item3 = [_mainTab.items objectAtIndex:2];
    [item3 setFinishedSelectedImage:[UIImage imageNamed:@"底栏-消息-点击态"] withFinishedUnselectedImage:[UIImage imageNamed:@"底栏-消息-常态"]];
    [item3 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(72, 72, 72)} forState:UIControlStateNormal];
    [item3 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(43, 166, 15)} forState:UIControlStateSelected];
    
    UITabBarItem * item4 = [_mainTab.items objectAtIndex:3];
    [item4 setFinishedSelectedImage:[UIImage imageNamed:@"底栏-朋友-点击态"] withFinishedUnselectedImage:[UIImage imageNamed:@"底栏-朋友-常态"]];
    [item4 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(72, 72, 72)} forState:UIControlStateNormal];
    [item4 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(43, 166, 15)} forState:UIControlStateSelected];
    
    UITabBarItem * item5 = [_mainTab.items objectAtIndex:4];
    [item5 setFinishedSelectedImage:[UIImage imageNamed:@"底栏-我的-点击态"] withFinishedUnselectedImage:[UIImage imageNamed:@"底栏-我的-常态"]];
    [item5 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(72, 72, 72)} forState:UIControlStateNormal];
    [item5 setTitleTextAttributes:@{UITextAttributeTextColor: COLOR(43, 166, 15)} forState:UIControlStateSelected];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
